<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('用户提现列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								账户姓名：<input type="text" name="accountName"/>
							</li>
							<li>
								转出账户：<input type="text" name="outAccount"/>
							</li>


							

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				
				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="UserRealMoney:userRealmoney:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('UserRealMoney:userRealmoney:edit')}]];
        var removeFlag = [[${@permission.hasPermi('UserRealMoney:userRealmoney:remove')}]];
        var prefix = ctx + "UserRealMoney/UserRealMoneyVerify";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                detailUrl: prefix + "/edit/{id}",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "用户提现",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : '主键',
					visible: false
				},
				{
					field : 'outWay', 
					title : '提现方式',
					sortable: false
				},
				{
					field : 'accountName', 
					title : '账户姓名',
					sortable: false
				},
				{
					field : 'outAccount', 
					title : '转出账户',
					sortable: false
				},
				{
					field : 'money', 
					title : '提现金额',
					sortable: true
				},
				{
					field : 'account', 
					title : '余额',
					sortable: true
				},
				{
					field : 'createDate', 
					title : '申请时间',
					sortable: false
				},
				
			
				
				
				
				
				
				
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="thisDetail(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');                       
                        actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateStatus(\'' + row.id + '\')"><i class="fa fa-edit"></i>同意提现</a> ');
                        actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateStatus2(\'' + row.id + '\')"><i class="fa fa-edit"></i>不同意提现</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
        
        function thisDetail(id) {
        	var _url = $.operate.detailUrl(id);
        	var options = {
   				title: $.table._option.modalName + "详情",
   				width: 1300,
   				height: 800,
   				url: prefix + "/edit/" + id,
   				skin: 'layui-layer-gray', 
   				btn: ['关闭'],
   				yes: function (index, layero) {
   	                layer.close(index);
                }
   			};
        	$.modal.openOptions(options);
        }
        
        function updateStatus(id) {
        	$.modal.confirm("是否确认同意提现？", function() {
    			var url = prefix + "/updateStatus";
    			var data = { "id": id };
        	    $.operate.submit(url, "post", "json", data);
    		});
        }
        
        function updateStatus2(id) {
        	$.modal.confirm("是否确认不同意提现？", function() {
    			var url = prefix + "/updateStatus2";
    			var data = { "id": id };
        	    $.operate.submit(url, "post", "json", data);
    		});
        }
    </script>
</body>
</html>